#pragma once

#include "DuiLib\UIlib.h"
#include "File/Record.h"
using namespace DuiLib;

//typedef enum {
//	VIRGIN = 0,
//	NORMAL,
//	USED_NORMAL,
//	RECORD_LOCK,
//	USED_LOCK
//}STATUS;

class CMyListElementUI : public CListLabelElementUI
{
	DECLARE_DUICONTROL(CMyListElementUI)

public:
	CMyListElementUI();
	~CMyListElementUI();
	void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
	void DoPaint(HDC hDC, const RECT& rcPaint);
	void DrawItemBk(HDC hDC, const RECT& rcItem);
	void PaintStatusImage(HDC hDC);
	void DrawItemText(HDC hDC, const RECT& rcItem);
	//void DoEvent(TEventUI &event);
	void SetStatus(RECORD_STATUS status);
	int GetStatus();
	void SetVirNum(int num);
	int GetVirNum();

private:
	RECORD_STATUS mStatus;
	RECT virNumPos;
	CSize virNumTextSize;

	RECT lockPos;

	int mVirNum;
};

